Class sjl.Bind2ndFunction
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sjl.Bind2ndFunction

java.lang.Object
   |
   +----sjl.Bind2ndFunction

public class Bind2ndFunction
extends Object
implements Function1
A function adapter. The Bind2ndFunction class can wrap a Function2 class so that it appears as a Function1.
    Algo.transform(list.begin(), list.end(), list.begin()
              new Bind2ndFunction(new Integer(5), new FuncDifferenceInteger()));
The above example will subtract the value of each integer element from 5 and store result in the list.

Copyright © 1996 Finn Bock


Constructor Index

 o Bind2ndFunction(Function2, Object)
Specified the function and the value to use.

Method Index

 o perform(Object)
Call the specified function using value and the argument.

Constructors

 o Bind2ndFunction
  public Bind2ndFunction(Function2 func,
                         Object val)
Specified the function and the value to use.

Methods

 o perform
  public Object perform(Object o)
Call the specified function using value and the argument.

All Packages  Class Hierarchy  This Package  Previous  Next  Index